public class Solution2 {
    //https://leetcode.cn/problems/to-lower-case/
    //转换成小写字母
    public String toLowerCase(String s) {
        StringBuilder stringBuilder = new StringBuilder();
        for(int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            if(Character.isLetter(ch)) {
                if(Character.isUpperCase(ch)) {
                    ch = (char)(ch + 32);
                }
            }
            stringBuilder.append(ch);
        }
        return stringBuilder.toString();
    }

}
